package com.lonely.fx.table_view.entity;

import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;

/**
 * @date: 2022-08-02 11:04
 * @author: ztkj-hzb
 * @description: 简单的javabean
 **/
public class SimplePersonProperty {

    /**
     * 用户名
     */
    private SimpleStringProperty name = new SimpleStringProperty();

    /**
     * 年龄
     */
    private SimpleIntegerProperty age = new SimpleIntegerProperty();

    /**
     * 家庭住址
     */
    private SimpleStringProperty address = new SimpleStringProperty();

    /**
     * 是否已婚
     */
    private SimpleBooleanProperty married = new SimpleBooleanProperty();

    public SimplePersonProperty() {
    }

    public SimplePersonProperty(String name, Integer age, String address, Boolean married) {
        this.name.set(name);
        this.age.set(age);
        this.address.set(address);
        this.married.set(married);
    }

    public String getName() {
        return name.get();
    }

    public SimplePersonProperty setName(String name) {
        this.name.set(name);
        return this;
    }

    public Integer getAge() {
        return age.get();
    }

    public SimplePersonProperty setAge(Integer age) {
        this.age.set(age);
        return this;
    }

    public String getAddress() {
        return address.get();
    }

    public SimplePersonProperty setAddress(String address) {
        this.address.set(address);
        return this;
    }

    public Boolean getMarried() {
        return married.get();
    }

    public SimplePersonProperty setMarried(Boolean married) {
        this.married.set(married);
        return this;
    }


    public SimpleStringProperty getNameProperty(){
        return this.name;
    }

    public SimpleIntegerProperty getAgeProperty(){
        return this.age;
    }

    public SimpleStringProperty getAddressProperty(){
        return this.address;
    }

    public SimpleBooleanProperty getMarriedProperty(){
        return this.married;
    }


}
